//
//  Date+Extensions.swift
//  SFDevFly
//
//  Created by shen on 2023/9/28.
//

import Foundation

extension Date {
    func string(with format: String = "yyyy-MM-dd HH:mm:ss") -> String {
        let dateFormatter = DateFormatter()
        dateFormatter.dateFormat = format
        dateFormatter.locale = Locale.current
        return dateFormatter.string(from: self)
    }
}
